#include "hana.h"

NodeHana::NodeHana(Node *parent, NodeHanaParam params) :
    Node(parent)
{
    NodeTRunnerParam node_param_885091352;
    node_param_885091352.num_of_main_memory = params.num_of_main_memory;
    node_param_885091352.multiplexer = params.multiplexer;
    node_trunner = new NodeTRunner(this, node_param_885091352);
    NodePeerClusterParam node_param_885091688;
    node_param_885091688.peer_id_base = params.peer_id_base;
    node_param_885091688.num_of_peer_group = params.num_of_peer_group;
    node_param_885091688.num_of_peer = params.num_of_peer;
    node_param_885091688.softmem_size = params.softmem_size;
    node_param_885091688.num_of_main_memory = params.num_of_main_memory;
    node_param_885091688.num_of_alu = params.num_of_alu;
    node_param_885091688.multiplexer = params.multiplexer;
    node_param_885091688.total_peers = params.total_peers;
    node_param_885091688.base_ptrs = params.base_ptrs;
    node_cluster = new NodePeerCluster(this, node_param_885091688);
    port_top_receiver = node_trunner->port_nano_op_receiver;
    port_eop_receiver = node_cluster->port_nano_op_receiver;
    port_memory_receivers = node_cluster->port_memory_receivers;
    port_memory_senders = node_cluster->port_memory_senders;
    port_memory_requester = node_trunner->port_memory_ports;
    port_halt = node_cluster->port_halt;
}

NodeTaskList NodeHana::tasks() const
{
    NodeTaskList list;
    return list;
}